<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  
  <title itemprop="name">Hexo安装及使用教程 | 六六の小屋</title>
  
    <link rel="shortcut icon" href="/images/favicon.ico">
  
  <meta http-equiv="x-dns-prefetch-control" content="on">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC" media="all">
  <link rel="dns-prefetch" href="//cdn.jsdelivr.net">
  <link rel="stylesheet" id="saukra_css-css" href="/css/style.css" type="text/css" media="all">
  <link rel="stylesheet" href="/css/lib.min.css" media="all">
  <link rel="stylesheet" href="/css/font.css" media="all">
  <link rel="stylesheet" href="/css/insight.css" media="all">
  <link rel="stylesheet" href="/css/jquery.fancybox.min.css" media="all">
  <link rel="stylesheet" href="/css/zoom.css" media="all">
  <link rel="stylesheet" type="text/css" href="/css/sharejs.css">
<!--   <link rel="stylesheet" id="saukra_css-css" href="https://2heng.xin/wp-content/cache/autoptimize/css/autoptimize_ad42a61f4c7d4bdd9f91afcff6b5dda5.css
" type="text/css" media="all"> -->
  <script>
  /*Initial Variables*/
  var mashiro_option = new Object();
  var mashiro_global = new Object();
  mashiro_option.NProgressON = true;
  /* 
   * 邮箱信息之类的东西可以填在这里，这些js变量基本都作用于sakura-app.js
   * 这样的设置仅是为了方便在基于PHP开发的主题中设置js变量，既然移植到了Node上，我想或许可以精简这一逻辑吧
   */
  mashiro_option.email_domain = "";
  mashiro_option.email_name = "";
  mashiro_option.cookie_version_control = "";
  mashiro_option.qzone_autocomplete = false;
  mashiro_option.site_name = "六六の小屋";
  mashiro_option.author_name = "六六の小屋";
  mashiro_option.site_url = "https://aill.gitee.io/";
  mashiro_option.v_appId = "4L0A8uj9wCovgVFfLu7xHuGi-gzGzoHsz";
  mashiro_option.v_appKey = "MJiSk3Pctl8GKzoA3n1dGLQJ";
  mashiro_option.mathjax = "0";
  mashiro_option.qq_api_url = "https://api.mashiro.top/qqinfo/"; 
  mashiro_option.qq_avatar_api_url = "https://api.mashiro.top/qqinfo/";

  // mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/moezx/cdn@3.4.5/css/lib.min.css";
  // mashiro_option.float_player_on = true;

  /*End of Initial Variables*/
  </script>
  <script type="text/javascript">
  var bg = "/images/bg/1.jpg,/images/bg/2.jpg".split(",");
  var bgindex = Math.floor(Math.random()*bg.length);
  if (!!window.ActiveXObject || "ActiveXObject" in window) { //is IE?
    alert('朋友，IE浏览器未适配哦~');
  }
  </script>
  <style type="text/css">
  .hljs-ln{border-collapse:collapse}.hljs-ln td{padding:0}.hljs-ln-n:before{content:attr(data-line-number)}
  </style>
  <style type="text/css">.site-top .lower nav{display:block !important;}.author-profile i,.post-like a,.post-share .show-share,.sub-text,.we-info a,span.sitename,.post-more i:hover,#pagination a:hover,.post-content a:hover,.float-content i:hover{color:#FE9600}.feature i,.download,.navigator i:hover,.links ul li:before,.ar-time i,span.ar-circle,.object,.comment .comment-reply-link,.siren-checkbox-radio:checked + .siren-checkbox-radioInput:after{background:#FE9600}::-webkit-scrollbar-thumb{background:#FE9600}.download,.navigator i:hover,.link-title,.links ul li:hover,#pagination a:hover,.comment-respond input[type='submit']:hover{border-color:#FE9600}.entry-content a:hover,.site-info a:hover,.comment h4 a,#comments-navi a.prev,#comments-navi a.next,.comment h4 a:hover,.site-top ul li a:hover,.entry-title a:hover,#archives-temp h3,span.page-numbers.current,.sorry li a:hover,.site-title a:hover,i.iconfont.js-toggle-search.iconsearch:hover,.comment-respond input[type='submit']:hover{color:#FE9600}.comments .comments-main{display:block !important;}.comments .comments-hidden{display:none !important;}background-position:center center;background-attachment:inherit;}
  </style>
<meta name="generator" content="Hexo 5.0.0"></head>


<body
  class="page-template page-template-user page-template-page-analytics page-template-userpage-analytics-php page page-id-1297 chinese-font serif isWebKit">
  <div class="scrollbar" id="bar">
  </div>
  <a href="#" class="cd-top faa-float animated"></a>
  <section id="main-container">
    <div class="headertop filter-dot">
  <div id="banner_wave_1"></div>
  <div id="banner_wave_2"></div>
  <figure id="centerbg" class="centerbg">
    <div class="focusinfo no-select">
      <div class="header-tou">
        <a target="_blank" rel="noopener" href="https://aill.gitee.io/">
          <img src="/images/avatar.png">
        </a>
      </div>
      <div class="header-info">
        <p>不积跬步,无以至千里!</p>
        <div class="top-social_v2">
          <li id="bg-pre">
            <img class="flipx" src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/other/next-b.svg">
          </li>
          
            
              
                <li>
                  <a href="https://wpa.qq.com/msgrd?v=3&amp;uin=2403988624&amp;site=qq&amp;menu=yes" target="_blank" class="social-github" title="qq">
                    <img src="/images/social/qq.png">
                  </a>
                </li>
              
            
              
                <li class="wechat">
                  <a href="/#">
                    <img src="/images/social/wechat.png">
                  </a>
                  <div class="wechatInner">
                    <img src="/images/donate/wechat.jpg">
                  </div>
                </li>
              
            
              
                <li>
                  <a href="https://space.bilibili.com/13503064" target="_blank" class="social-github" title="bilibili">
                    <img src="/images/social/bilibili.png">
                  </a>
                </li>
              
            
              
                <li>
                  <a href="https://weibo.com/u/3125196513?refer_flag=1001030103_&amp;is_all=1" target="_blank" class="social-github" title="weibo">
                    <img src="/images/social/weibo.png">
                  </a>
                </li>
              
            
          
          <li id="bg-next">
            <img src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/other/next-b.svg">
          </li>
        </div>
      </div>
    </div>
  </figure>
  <div id="video-container" style="">
    <video style="object-fit: fill" id="bgvideo" class="video" video-name="" src="" width="auto" preload="auto">
    </video>
    <div id="video-btn" class="loadvideo videolive">
    </div>
    <div id="video-add">
    </div>
    <div class="video-stu">
    </div>
  </div>
  <div class="headertop-down faa-float animated" onclick="headertop_down()">
    <span>
      <i class="fa fa-chevron-down" aria-hidden="true">
      </i>
    </span>
  </div>
</div>
    <div id="page" class="site wrapper">
      <header class="site-header no-select gizle sabit" role="banner">
  <div class="site-top">
    <div class="site-branding">
      <span class="site-title">
        <span class="logolink moe-mashiro">
          <a href="/">
            <!-- <span class="sakurasono"></span> -->
            <span class="shironeko">六六の小屋</span>
          </a>
        </span>
      </span>
    </div>
    <div class="searchbox search-form-submit">
      <i class="iconfont js-toggle-search iconsearch icon-search">
      </i>
    </div>
    <div id="show-nav" class="showNav mobile-fit">
      <div class="line line1">
      </div>
      <div class="line line2">
      </div>
      <div class="line line3">
      </div>
    </div>
    <div class="lower-cantiner">
      <div class="lower">
        <nav class="mobile-fit-control hide">
          <ul id="menu-new" class="menu">
            
              <li>
                <a href="/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-fort-awesome faa-shake" aria-hidden="true"></i>
                    首页
                  </span>
                </a>
                
              </li>
            
              <li>
                <a href="javascript:;">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-folder-open faa-wrench" aria-hidden="true"></i>
                    分类
                  </span>
                </a>
                
                  <ul class="sub-menu">
                    
                      <li>
                        <a href="/categories/%E6%8A%80%E6%9C%AF/">
                          <i class="fa fa-code" aria-hidden="true"></i>
                          技术
                        </a>
                      </li>
                    
                      <li>
                        <a href="/categories/%E7%94%9F%E6%B4%BB/">
                          <i class="fa fa-file-text-o" aria-hidden="true"></i>
                          生活
                        </a>
                      </li>
                    
                      <li>
                        <a href="/categories/%E8%B5%84%E6%BA%90/">
                          <i class="fa fa-cloud-download" aria-hidden="true"></i>
                          资源
                        </a>
                      </li>
                    
                      <li>
                        <a href="/categories/%E9%9A%8F%E6%83%B3/">
                          <i class="fa fa-commenting-o" aria-hidden="true"></i>
                          随想
                        </a>
                      </li>
                    
                  </ul>
                
              </li>
            
              <li>
                <a href="javascript:;">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-list-ul faa-vertical" aria-hidden="true"></i>
                    兴趣
                  </span>
                </a>
                
                  <ul class="sub-menu">
                    
                      <li>
                        <a href="/tags/%E6%82%A6%E8%AF%BB/">
                          <i class="fa fa-book" aria-hidden="true"></i>
                          书单
                        </a>
                      </li>
                    
                      <li>
                        <a href="/bangumi/">
                          <i class="fa fa-film" aria-hidden="true"></i>
                          番组
                        </a>
                      </li>
                    
                      <li>
                        <a href="/music/">
                          <i class="fa fa-headphones" aria-hidden="true"></i>
                          歌单
                        </a>
                      </li>
                    
                      <li>
                        <a href="/photos/">
                          <i class="fa fa-photo" aria-hidden="true"></i>
                          图集
                        </a>
                      </li>
                    
                  </ul>
                
              </li>
            
              <li>
                <a href="/archives/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-calendar-times-o faa-tada" aria-hidden="true"></i>
                    时间轴
                  </span>
                </a>
                
              </li>
            
              <li>
                <a href="/comment/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-pencil-square-o faa-tada" aria-hidden="true"></i>
                    留言板
                  </span>
                </a>
                
              </li>
            
              <li>
                <a href="/links/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-link faa-shake" aria-hidden="true"></i>
                    友人帐
                  </span>
                </a>
                
              </li>
            
              <li>
                <a href="/donate/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-thumbs-up faa-shake" aria-hidden="true"></i>
                    赞赏
                  </span>
                </a>
                
              </li>
            
              <li>
                <a href="/about/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-leaf faa-wrench" aria-hidden="true"></i>
                    关于
                  </span>
                </a>
                
                  <ul class="sub-menu">
                    
                      <li>
                        <a href="/./love/">
                          <i class="fa fa-heart" aria-hidden="true"></i>
                          唯爱
                        </a>
                      </li>
                    
                      <li>
                        <a href="/lab/">
                          <i class="fa fa-cogs" aria-hidden="true"></i>
                          Lab
                        </a>
                      </li>
                    
                  </ul>
                
              </li>
            
              <li>
                <a href="/client/">
                  <span class="faa-parent animated-hover">
                    <i class="fa  fa-android faa-vertical" aria-hidden="true"></i>
                    APP
                  </span>
                </a>
                
              </li>
            
          </ul>
        </nav>
      </div>
    </div>
  </div>
</header>

      <link rel="stylesheet" type="text/css" href="/css/sharejs.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css">
<div class="pattern-center-blank"></div>

  <div class="pattern-center single-center">
    <!-- 有配图默认渲染第一张 -->
    <div class="pattern-attachment-img lazyload" style="background-image: url(/images/az/demo.png);" src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/loader/orange.progress-bar-stripe-loader.svg" data-src="/images/az/demo.png">
    </div>
    <header class="pattern-header single-header">
      <h1 class="entry-title">
      Hexo安装及使用教程</h1>
      <p class="entry-census">
        <span>
          <a target="_blank" rel="noopener" href="https://aill.gitee.io">
            <img src="/images/avatar.png">
          </a>
        </span>
        <span>
          <a target="_blank" rel="noopener" href="https://aill.gitee.io">LiuLiu</a>
        </span>
        <span class="bull">
        ·</span>
        2020-7-31<span class="bull">
        ·</span>
      <span id="busuanzi_value_page_pv"></span>次阅读</p>
    </header>
  </div>

<div id="content" class="site-content">
  <div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
      <article id="post-1" class="post-1 post type-post status-publish format-standard has-post-thumbnail hentry category-uncategorized">
        <div class="toc"></div>
        <!--<div class="toc-entry-content"><!-- 套嵌目录使用（主要为了支援评论）-->
        
        <div class="entry-content">
          <h2 id="一-前言"><a href="#一-前言" class="headerlink" title="一.前言"></a>一.前言</h2><ul>
<li><p>为什么要搭建博客，因为某天突然看到好多大神级别的人物在发自己搭建的博客，效果特别的好，作为小白的我看了之后，蠢蠢欲动，于是乎一下走上了不归的试坑道路</p>
</li>
<li><p>搭建个人博客，一方面可以记录生活的方方面面，按照自己的需求设计自己的模块，可以说是私人订制了，另一方面就是给别人提供了一种了解你自己的渠道，可以说是自己的一个名片，因为我们需要的是让更多的人认识我们，而不是我们认识更多的人</p>
</li>
</ul>
<h2 id="二-为什么用hexo-码云搭建"><a href="#二-为什么用hexo-码云搭建" class="headerlink" title="二.为什么用hexo+码云搭建"></a>二.为什么用hexo+码云搭建</h2><ol>
<li><p>我感觉搭建博客最简单的方法就是，在一个服务器上面去搭建，比如说阿里云，腾讯云等等，我们只需要在服务器的文件系统上传压缩包并解压，用测试域名就可以看到效果了，但是现在服务器都是收费的，从理想的角度来考虑，当然要选择一个可以长期使用而且不收费的服务器</p>
</li>
<li><p>之所以我们选择码云，因为码云上有gitee pages(免费的静态网页托管服务)，目前码云支持Jekyll、Hugo、Hexo编译静态资源</p>
</li>
<li><p>而且hexo基于Node.js实现的，而且目前主流的vue前端一般都是使用npm或者yarn来跑项目，因此使用hexo搭建博客比较简单</p>
</li>
</ol>
<h2 id="三-hexo-本地博客搭建"><a href="#三-hexo-本地博客搭建" class="headerlink" title="三.hexo 本地博客搭建"></a>三.hexo 本地博客搭建</h2><p><strong>这里我以windows系统为例，因为我条件限制，希望理解</strong></p>
<h3 id="1-准备"><a href="#1-准备" class="headerlink" title="1. 准备"></a>1. 准备</h3><p>首先需要下载安装两个软件，去官网下载一下node.js和 git，如何git 下载比较慢的话，在下面说码云使用教程模块，也有下载链接</p>
<blockquote>
<ol>
<li><a target="_blank" rel="noopener" href="https://nodejs.org/en/" title="node.js下载">node.js下载</a></li>
<li><a target="_blank" rel="noopener" href="https://npm.taobao.org/mirrors/git-for-windows/" title="git下载">git下载</a></li>
</ol>
</blockquote>
<h3 id="2-Node-js-的安装配置"><a href="#2-Node-js-的安装配置" class="headerlink" title="2.Node.js 的安装配置"></a>2.Node.js 的安装配置</h3><p>下载完 node.js 进行安装就可以了。</p>
<h3 id="3-hexo-的安装"><a href="#3-hexo-的安装" class="headerlink" title="3.hexo 的安装"></a>3.hexo 的安装</h3><p>接下来我们安装hexo，直接在桌面右键，选择Git Bash Here，打开git 命令，执行如下命令安装全局Hexo</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-cli -g</span><br></pre></td></tr></table></figure>

<h3 id="4-初始化项目文件"><a href="#4-初始化项目文件" class="headerlink" title="4.初始化项目文件"></a>4.初始化项目文件</h3><p>在准备放项目文件的目录，可以通过windows的cmd终端或者git bash 执行如下的命令.  //注意：blog为项目的文件夹名可自定义</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo init blog</span><br></pre></td></tr></table></figure>

<p>执行命令就会开始下载文件,下载后会出现以下目录</p>
<blockquote>
<p><img src="/images/az/ml.png" alt="目录"></p>
</blockquote>
<h3 id="5-本地测试项目"><a href="#5-本地测试项目" class="headerlink" title="5.本地测试项目"></a>5.本地测试项目</h3><p>输入常用的hexo 命令进行本地的测试</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ hexo clean  &#x2F;&#x2F;清空已经存在的hexo网站文件</span><br><span class="line">$ hexo generate(可简写g)  &#x2F;&#x2F;生成网站文件</span><br><span class="line">$ hexo server(可简写为s)  &#x2F;&#x2F;启动本地服务器</span><br></pre></td></tr></table></figure>
<p>我们先 输入 hexo g 生成网站文件</p>
<blockquote>
<p><img src="/images/az/sc.png" alt="生成"></p>
</blockquote>
<p>然后再输入 hexo s 启动本地服务器，然后在浏览器输入 <a target="_blank" rel="noopener" href="http://localhost:4000/">http://localhost:4000</a> 就能看到样式内容了</p>
<blockquote>
<p><img src="/images/az/demo.png" alt="demo"></p>
</blockquote>
<p>到这里本地测试就结束了，关键要放在服务器上面，本地测试适用于一边修改代码、一边刷新网页查看修改好的样子</p>
<h2 id="四-码云部署"><a href="#四-码云部署" class="headerlink" title="四.码云部署"></a>四.码云部署</h2><h3 id="1-注册码云"><a href="#1-注册码云" class="headerlink" title="1. 注册码云"></a>1. 注册码云</h3><p>首先需要注册码云的账号，然后在创建一个仓库，这里初次使用码云的话可以，先看一下码云入门</p>
<h3 id="2-官网注册"><a href="#2-官网注册" class="headerlink" title="2. 官网注册"></a>2. 官网注册</h3><p>可以直接进入码云官网：<a target="_blank" rel="noopener" href="https://gitee.com/">https://gitee.com/</a> 都是中文一看就会的那种</p>
<h3 id="3-创建仓库"><a href="#3-创建仓库" class="headerlink" title="3. 创建仓库"></a>3. 创建仓库</h3><p>特别要注意这里有个大坑：仓库名称，使用语言(JavaScript)，访问权限(公开)</p>
<blockquote>
<p><img src="/images/az/ck.png" alt="仓库"></p>
</blockquote>
<ul>
<li>作为小白的我，成功的掉进这个坑里爬了好几天，没爬出来，最终请教大神帮忙，才发现是此处的原因。<br>当时，写的仓库名不是我的用户名，导致码云pages部署的路径有问题，导致相对路径不对，读不到css样式和js运行文件，所有进去后就是这个样子，所以依次告警大家不要入坑</li>
</ul>
<h3 id="4-获取仓库地址"><a href="#4-获取仓库地址" class="headerlink" title="4. 获取仓库地址"></a>4. 获取仓库地址</h3><blockquote>
<p><img src="/images/az/dz.png" alt="地址"></p>
</blockquote>
<h3 id="5-修改配置文件"><a href="#5-修改配置文件" class="headerlink" title="5. 修改配置文件"></a>5. 修改配置文件</h3><p>在blog主目录下找到 _config.yml 打开进行配置，在代码的最底下修改</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">deploy:</span><br><span class="line">  type: git</span><br><span class="line">  repo: https:&#x2F;&#x2F;gitee.com&#x2F;×××&#x2F;×××.git  #仓库地址</span><br><span class="line">  branch: master</span><br><span class="line">  massage: #自定义提交消息</span><br></pre></td></tr></table></figure>
<ul>
<li>特别注意这里还有个坑：修改代码时候注意空格，例如 repo： 后面都是有空格的，删除空格之后，后面运行的时候就会报错，这是编码的规定，还有就是deploy一定从行首开始写，不要加空格，注意格式</li>
</ul>
<h3 id="6-开始部署"><a href="#6-开始部署" class="headerlink" title="6. 开始部署"></a>6. 开始部署</h3><p>输入以下命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-deployer-git --save  &#x2F;&#x2F;先安装deployer</span><br><span class="line">hexo g  &#x2F;&#x2F;生成网站文件</span><br><span class="line">hexo d  &#x2F;&#x2F;上传到远程在码云上新建的仓库</span><br><span class="line">&#x2F;&#x2F;也可以采用一键部署</span><br><span class="line">hexo g --d</span><br></pre></td></tr></table></figure>
<ul>
<li>此时会弹出对话框让我们输入码云的用户名和密码，我们输完以后，就会开始上传，在本地文件夹中会多出来.deploy_git文件夹（上传的是此文件夹下的内容，也就是生成的网站文件，另外我们本地编译生成的html 文件保存在public文件夹下）</li>
<li>登录码云账户，打开和自己用户名相同的仓库观察，如果出现和.deploy_git或者public文件夹下的文件就证明文件上传成功</li>
</ul>
<h3 id="7-开启pages功能"><a href="#7-开启pages功能" class="headerlink" title="7. 开启pages功能"></a>7. 开启pages功能</h3><blockquote>
<p><img src="/images/az/kq.png" alt="开启"></p>
</blockquote>
<p>这样我们就可以点击生成的域名来看我们搭建的效果了 <a target="_blank" rel="noopener" href="https://aill.gitee.io/">https://aill.gitee.io</a></p>
<h2 id="五-博客使用"><a href="#五-博客使用" class="headerlink" title="五.博客使用"></a>五.博客使用</h2><h3 id="1-编写文章"><a href="#1-编写文章" class="headerlink" title="1.编写文章"></a>1.编写文章</h3><blockquote>
<p>给大家推荐一个软件 vsCode 这个软件占用空间很小，插件很多，功能特别强大，我们可以打开我们整个文件夹，进行修改代码，写文章，对我们提高效率很有帮助</p>
</blockquote>
<p><strong>方法一</strong><br>通过命令来实现</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new hello  &#x2F;&#x2F;hello 为博客的文件名</span><br></pre></td></tr></table></figure>
<p>同时会在 根目录下 /source/_posts 目录下生成hello.md</p>
<p><strong>方法二</strong><br>手动到根目录下 /source/_posts 目录下，创建一个 makedown 文件进行编写就可以了<br>文件开头可以参考这里来写</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title： file_name</span><br><span class="line">tag： 标签名</span><br><span class="line">categories： 分类</span><br><span class="line">comment： 是否允许评论(true or false)</span><br><span class="line">description：描述</span><br><span class="line">---</span><br><span class="line">文章的正文部分，可以参考markdown 语法格式来写</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="2-发布文章"><a href="#2-发布文章" class="headerlink" title="2.发布文章"></a>2.发布文章</h3><p>还是使用命令，推送到gitee上</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo g --d</span><br></pre></td></tr></table></figure>
<ul>
<li>推送成功之后，去观察码云的远程仓库，md格式的文件会自动生成到对应的目录，并且转化成html格式</li>
<li>然后浏览创建好的网站，如果发现没有找到发布的文章，就到码云的page服务，去更新</li>
<li>进入自己的网站后，如果没有变化，可以按 F5 刷新网站，刷新没有用的话，清空一下浏览器缓存就可以了</li>
</ul>
<h2 id="六-参考文献"><a href="#六-参考文献" class="headerlink" title="六.参考文献"></a>六.参考文献</h2><ul>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_45631738/article/details/104716374" title="hexo+gitee(码云)搭建个人博客避开所有坑">hexo+gitee(码云)搭建个人博客避开所有坑</a></li>
</ul>

        </div>
        <!-- .entry-content -->
        <div class="single-reward">
          <div class="reward-open">赏
            <div class="reward-main">
              <ul class="reward-row">
                <li class="alipay-code"><img src="/images/donate/AliPayQR.jpg"></li>
                <li class="wechat-code"><img src="/images/donate/WeChatQR.jpg"></li>
              </ul>
            </div>
          </div>
        </div>
        <div style="text-align:center; width: 100%" class="social-share share-mobile" data-disabled="diandian, tencent"></div>
        <footer class="post-footer">
          <div class="post-lincenses"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="nofollow"><i class="fa fa-creative-commons" aria-hidden="true"></i> 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a></div>
          <div class="post-tags">
          </div>
          <div class="post-share">
            <div class="social-share sharehidden share-component"></div>
            <i class="iconfont show-share icon-forward"></i>
          </div>
        </footer><!-- .entry-footer -->
      </article>
      <!-- #post-## -->
      <div class="toc" style="background: none;"></div>
      <section class="post-squares nextprev">
        
          
            <div class="post-nepre full previous">
          
            <a href="/2020/08/03/hexo-sakura/" rel="prev">
              <div class="background">
                <img class="lazyload" src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/loader/orange.progress-bar-stripe-loader.svg" data-src="/images/sakura/demo.png" style="width: 100%; height: 100%; object-fit: cover; pointer-events: none;" onerror="imgError(this,3)" src="/images/sakura/demo.png">
              </div>
              <span class="label">
              Previous Post</span>
              <div class="info">
                <h3>
                Hexo Sakura使用教程</h3>
                <hr>
              </div>
            </a>
          </div>
        
        
      </section>
      
<div id="vcomments"></div>
<script>
  window.onload = function(){
      var valine = new Valine();
      valine.init({
        el: '#vcomments',
        appId: "4L0A8uj9wCovgVFfLu7xHuGi-gzGzoHsz",
        appKey: "MJiSk3Pctl8GKzoA3n1dGLQJ",
        path: window.location.pathname,
        placeholder: "你是我一生只会遇见一次的惊喜 ..."
      })
  }
</script>

      <section class="author-profile">
        <div class="info" itemprop="author" itemscope="" itemtype="https://schema.org/Person">
          <a target="_blank" rel="noopener" href="https://aill.gitee.io" class="profile gravatar"><img src="/images/avatar.png" itemprop="image" alt="LiuLiu" height="70" width="70"></a>
          <div class="meta">
            <span class="title">Author</span>
            <h3 itemprop="name">
            <a target="_blank" href="https://aill.gitee.io" itemprop="url" rel="author noopener">LiuLiu</a>
            </h3>
          </div>
        </div>
        <hr>
        <p><i class="iconfont icon-write"></i>不积跬步，无以至千里！</p>
      </section>
    </main><!-- #main -->
  </div><!-- #primary -->
</div>



    </div>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="请输入关键词..."/>
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            // PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
    <!-- <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 LiuLiu<br>
      powered_by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer> -->
<footer id="colophon" class="site-footer" role="contentinfo">
  <div class="site-info">
    <div class="footertext">
      <div class="img-preload">
        <img src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/other/wordpress-rotating-ball-o.svg">
        <img src="https://cdn.jsdelivr.net/gh/honjun/cdn@1.6/img/other/disqus-preloader.svg">
      </div>
      <p style="color: #666666;">&copy 2020 LiuLiu</p>
    </div>
    <div class="footer-device">
    <p style="font-family: 'Ubuntu', sans-serif;">
        <span style="color: #b9b9b9;">This <a href="http://aill.gitee.io/" target="_blank" style="color: #b9b9b9;;text-decoration: underline dotted rgba(0, 0, 0, .1);">Website </a> <i class="iconfont icon-sakura rotating" style="color: #ffc0cb;display:inline-block"></i> by <a href="http://aill.gitee.io/" target="_blank" style="color: #b9b9b9;;text-decoration: underline dotted rgba(0, 0, 0, .1);">LiuLiu</a></a>, Powered by Hexo, Hosted by Coding Pages</a>
        </span>
      </p>
    </div>
  </div><!-- .site-info -->
</footer>



<!-- <script src="/js/tocbot.js"></script> -->
<script type="text/javascript" src="/js/lib.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script type="text/javascript" src="/js/InsightSearch.js"></script>
<script type="text/javascript" src="/js/jquery.fancybox.min.js"></script>
<script type="text/javascript" src="/js/zoom.min.js"></script>
<script type="text/javascript" src="/js/sakura-app.js"></script>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='//unpkg.com/valine@1.3.4/dist/Valine.min.js'></script>
<script src="/js/botui.js"></script>
<!-- 不蒜子 网页计数器 -->
<script src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script> -->
<script type="text/javascript">
/* <![CDATA[ */
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
  var Poi = {"pjax":"1","movies":{"url": "","name":"","live":"close"},"windowheight":"fixed","codelamp":"close","ajaxurl":"","order":"asc","formpostion":"bottom"};
} else {
  var Poi = {"pjax":"1","movies":{"url": "","name":"","live":"open"},"windowheight":"auto","codelamp":"close","ajaxurl":"","order":"asc","formpostion":"bottom"};
}
/* ]]> */

</script>
<script>
$(document).ready(function() {
  if ($(".toc").length > 0 && document.body.clientWidth > 1200) {
    if ($(".pattern-center").length > 0) { //有图的情况
      tocbot.init({
          // Where to render the table of contents.
          tocSelector: '.toc', // 放置目录的容器
          // Where to grab the headings to build the table of contents.
          contentSelector: '.entry-content', // 正文内容所在
          // Which headings to grab inside of the contentSelector element.
          scrollSmooth: true,
          headingSelector: 'h1, h2, h3, h4, h5', // 需要索引的标题级别
          headingsOffset: -400,
          scrollSmoothOffset: -85
      });
    } else {
      tocbot.init({
          // Where to render the table of contents.
          tocSelector: '.toc', // 放置目录的容器
          // Where to grab the headings to build the table of contents.
          contentSelector: '.entry-content', // 正文内容所在
          // Which headings to grab inside of the contentSelector element.
          scrollSmooth: true,
          headingSelector: 'h1, h2, h3, h4, h5', // 需要索引的标题级别
          headingsOffset: -85,
          scrollSmoothOffset: -85
      });
    }
    var offsetTop = $('.toc').offset().top - 95;
    window.onscroll = function() {
      var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
      if (scrollTop >= offsetTop) {
        $('.toc').addClass('toc-fixed');
      } else {
        $('.toc').removeClass('toc-fixed');
      }
    }
  }
});
</script>
<!-- 🌸飘落 -->
<script src="https://cdn.jsdelivr.net/gh/wallleap/cdn@latest/js/sakura.js"></script>

    <div class="openNav no-select" style="height: 50px;">
      <div class="iconflat no-select" style="width: 50px; height: 50px;">
        <div class="icon"></div>
      </div>
      <div class="site-branding search-form-submit">
        <i class="iconfont js-toggle-search iconsearch icon-search"></i>
      </div>
    </div>
  </section>
  <!-- 实现换肤功能 -->
  <div class="skin-menu no-select" id="mainskin" style="position: fixed">
  <div class="theme-controls row-container">
   <ul class="menu-list">
    <li id="white-bg"> <i class="fa fa-television" aria-hidden="true"></i></li>
    <li id="sakura-bg"> <i class="iconfont icon-sakura"></i></li>
    <li id="gribs-bg"> <i class="fa fa-slack" aria-hidden="true"></i></li>
    <li id="KAdots-bg"> <i class="iconfont icon-dots"></i></li>
    <li id="totem-bg"> <i class="fa fa-optin-monster" aria-hidden="true"></i></li>
    <li id="pixiv-bg"> <i class="iconfont icon-pixiv"></i></li>
    <li id="bing-bg"> <i class="iconfont icon-bing"></i></li>
    <li id="dark-bg"> <i class="fa fa-moon-o" aria-hidden="true"></i></li>
   </ul>
  </div>
 </div>
 <canvas id="night-mode-cover"></canvas>
 
  <div class="changeSkin-gear no-select">
    <div class="keys" id="setbtn"> 
     <span id="open-skinMenu"> 主题  
       <i class="iconfont icon-gear inline-block rotating"></i> 
     </span>
    </div>
  </div>
  <div id="mo-nav" class="">
  <div class="m-avatar">
    <img src="/images/avatar.png">
  </div>
  <p style="text-align: center; color: #333; font-weight: 900; font-family: 'Ubuntu', sans-serif; letter-spacing: 1.5px">六六の小屋</p>
  <p style="text-align: center; word-spacing: 20px;">
    
      
        <a href="https://wpa.qq.com/msgrd?v=3&uin=2403988624&site=qq&menu=yes" class="fa fa-qq" target="_blank" style="color: #25c6fe; margin-left:20px"></a>
      
        <a href="https://space.bilibili.com/13503064" class="fa fa-television" target="_blank" style="color: #ffb6c1; margin-left:20px"></a>
      
        <a href="https://weibo.com/u/3125196513?refer_flag=1001030103_&is_all=1" class="fa fa-weibo" target="_blank" style="color: #dd4b39; margin-left:20px"></a>
      
    
  </p>
  <ul id="menu-new-1" class="menu">
    
      <li>
        <a href="/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-fort-awesome faa-shake" aria-hidden="true"></i>
            首页
          </span>
        </a>
        
      </li>
    
      <li>
        <a href="javascript:;">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-folder-open faa-wrench" aria-hidden="true"></i>
            分类
          </span>
        </a>
        
          <ul class="sub-menu">
            
              <li>
                <a href="/categories/%E6%8A%80%E6%9C%AF/">
                  <i class="fa fa-code" aria-hidden="true"></i>
                  技术
                </a>
              </li>
            
              <li>
                <a href="/categories/%E7%94%9F%E6%B4%BB/">
                  <i class="fa fa-file-text-o" aria-hidden="true"></i>
                  生活
                </a>
              </li>
            
              <li>
                <a href="/categories/%E8%B5%84%E6%BA%90/">
                  <i class="fa fa-cloud-download" aria-hidden="true"></i>
                  资源
                </a>
              </li>
            
              <li>
                <a href="/categories/%E9%9A%8F%E6%83%B3/">
                  <i class="fa fa-commenting-o" aria-hidden="true"></i>
                  随想
                </a>
              </li>
            
          </ul>
        
      </li>
    
      <li>
        <a href="javascript:;">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-list-ul faa-vertical" aria-hidden="true"></i>
            兴趣
          </span>
        </a>
        
          <ul class="sub-menu">
            
              <li>
                <a href="/tags/%E6%82%A6%E8%AF%BB/">
                  <i class="fa fa-book" aria-hidden="true"></i>
                  书单
                </a>
              </li>
            
              <li>
                <a href="/bangumi/">
                  <i class="fa fa-film" aria-hidden="true"></i>
                  番组
                </a>
              </li>
            
              <li>
                <a href="/music/">
                  <i class="fa fa-headphones" aria-hidden="true"></i>
                  歌单
                </a>
              </li>
            
              <li>
                <a href="/photos/">
                  <i class="fa fa-photo" aria-hidden="true"></i>
                  图集
                </a>
              </li>
            
          </ul>
        
      </li>
    
      <li>
        <a href="/archives/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-calendar-times-o faa-tada" aria-hidden="true"></i>
            时间轴
          </span>
        </a>
        
      </li>
    
      <li>
        <a href="/comment/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-pencil-square-o faa-tada" aria-hidden="true"></i>
            留言板
          </span>
        </a>
        
      </li>
    
      <li>
        <a href="/links/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-link faa-shake" aria-hidden="true"></i>
            友人帐
          </span>
        </a>
        
      </li>
    
      <li>
        <a href="/donate/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-thumbs-up faa-shake" aria-hidden="true"></i>
            赞赏
          </span>
        </a>
        
      </li>
    
      <li>
        <a href="/about/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-leaf faa-wrench" aria-hidden="true"></i>
            关于
          </span>
        </a>
        
          <ul class="sub-menu">
            
              <li>
                <a href="/./love/">
                  <i class="fa fa-heart" aria-hidden="true"></i>
                  唯爱
                </a>
              </li>
            
              <li>
                <a href="/lab/">
                  <i class="fa fa-cogs" aria-hidden="true"></i>
                  Lab
                </a>
              </li>
            
          </ul>
        
      </li>
    
      <li>
        <a href="/client/">
          <span class="faa-parent animated-hover">
            <i class="fa  fa-android faa-vertical" aria-hidden="true"></i>
            APP
          </span>
        </a>
        
      </li>
    
  </ul>
  <p style="text-align: center; font-size: 13px; color: #b9b9b9;">&copy 2020 LiuLiu</p>
</div>
<button onclick="topFunction()" class="mobile-cd-top" id="moblieGoTop" title="Go to top" style="display: none;"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
<!-- require MetingJS -->
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
<style>
  .aplayer .aplayer-lrc {
    height: 35px;
  }
  .aplayer .aplayer-lrc p{
    font-size: 16px;
    font-weight: 700;
    line-height: 18px !important;
  }
  .aplayer .aplayer-lrc p.aplayer-lrc-current{
    color: #FF1493;
  }
  .aplayer.aplayer-narrow .aplayer-body{
    left: -66px !important;
  }
  .aplayer.aplayer-fixed .aplayer-lrc {
    display: none;
  }
  .aplayer .aplayer-lrc.aplayer-lrc-hide {
      display:none !important;
  }
  .aplayer.aplayer-fixed .lrc-show {
    display: block;
    background: rgba(255, 255, 255, 0.8);
  }
</style>
<meting-js

    id="2507814548"

    server="netease"

    type="playlist"

    fixed="true"

    autoplay="false"

    loop="all"

    order="random"

    preload="auto"

    volume="0.7"

    mutex="true"

</meting-js>
<script>
  $(function(){
    $('body').on('click', '.aplayer', function(){
      if($('.aplayer-button').hasClass('aplayer-play')) {
        $('.aplayer-lrc').removeClass('lrc-show');
      } else {
        $('.aplayer-lrc').addClass('lrc-show');
      }
    })
  });
</script>
</body>

</html>